//
//  CYTableViewCell.m
//  CaiYun
//
//  Created by 今日信息科技 on 2017/9/22.
//  Copyright © 2017年 今日信息科技. All rights reserved.
//

#import "CYTableViewCell.h"

@interface CYTableViewCell()
@end
@implementation CYTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
//        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.line.hidden = NO;//
        self.textLabel.textColor = TEXT_BLACK_COLOR;
        self.textLabel.font = [UIFont systemFontOfSize:AL(PT(28)) weight:UIFontWeightLight];
    }
    return self;
}

- (CYView *)line{
    if (!_line) {
        _line = [[CYView alloc]initWithColor:CELL_LINE_COLOR];
        [self addSubview:_line];
        
        [_line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.mas_equalTo(0.5);
            make.left.equalTo(self);
            make.right.equalTo(self);
            make.bottom.equalTo(self);
        }];
    }
    return _line;
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

//这里设置bgView或者contentview的颜色，等于cell高亮状态的颜色
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    [super setHighlighted:highlighted animated:animated];
    self.selectedBackgroundView = [[CYView alloc]initWithColor:RGBA(240, 55, 67, 0.1)];
}

//这里设置bgView或者contentview的颜色，等于cell选中状态的颜色
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

@end
